<div class="loding_context" *ngIf="loading" id="loding_context"></div>
<div class="row txtTitle" style="right: 20px;left: 20px;margin-top: 5px;position: absolute;">
    <div class="form-group pull-right select-mb" *ngIf="right['keywordTrial']['query']">
        <span class="pull-left form-span span_left_search">标引状态：</span>
        <select class="form-control select-style" name="status" (change)="search()" [(ngModel)]="status">
            <option value="">全部</option>
            <option value="0">启用</option>
            <option value="-1">禁用</option>
        </select>
    </div>

    <div class="form-group pull-right select-mb" *ngIf="right['keywordTrial']['query']">
        <span class="pull-left form-span span_left_search">标签：</span>
        <select class="form-control select-style" name="labelId" (change)="search()" [(ngModel)]="labelId">
            <option value="">全部</option>
            <option *ngFor="let val of themeTagListVal" value="{{ val.labelId }}">{{ val.labelName }}</option>
        </select>
    </div>

    <input matInput type="text" *ngIf="right['keywordTrial']['query']" class="input_style" #queryCriteria="ngModel" name="searchData" placeholder="请输入主题词名称"
           (input)="changesearch()" (keyup.enter)="changesearch()" [(ngModel)]="searchData" />

    <button class="btn btn-search btn-blue" *ngIf="right['keywordTrial']['query']" style="margin-right: 10px;" (click)="search()" mat-button>查询</button>

</div>


<div class="right-plate" id="leftKeywordTable" style="top: 40px;">
  <!-- [paginator]="true" [rows]="5" -->
  <div class="table-thead" *ngIf="files" [ngClass]="{'table-thead-scroll':files.length > 3}">
        <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
            <ng-template pTemplate="header">
                <tr class="tableStyle_thead_tr">
                    <th class="w20 text-left max-w">主题词</th>
                    <th class="w15 text-left max-w">标签</th>
                    <th class="w10 text-left max-w">主题词编码</th>
                    <th class="w15 text-left max-w">创建时间</th>
                </tr>
            </ng-template>
        </p-treeTable>
  </div>
  <div class="table-tbody">
    <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
        <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-i="index">
            <tr (click)="_selectThemeWordsNode(rowData.themeWordsId,rowData.themeTableId,rowData.name)" class="treegrid-2 treegrid-collapsed left-table-link"  [ngClass]="{'left-table-link-active':rowData.themeWordsId == currentThemeWordsNode}">
                <td class="w20 text-left max-w">
                    <p-treeTableToggler [rowNode]="rowNode" (onNodeExpand)="onNodeExpand($event)"></p-treeTableToggler>
                    {{rowData.name}}
                </td>
                <td class="w15 text-left max-w">{{rowData.labelName}}</td>
                <td class="w10 text-left max-w">{{rowData.themeCode}}</td>
                <td class="w15 text-left max-w">{{rowData.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
        </ng-template>
    </p-treeTable>
  </div>

</div>

<!-- 分页 BEGIN -->
<app-pagination [getTotalItems]="total" (isLoadTableFromPagination)="_pagination($event)"></app-pagination>
<!-- 分页 END -->